<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/login.css" />
<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="js/login.js"></script>
<script src="layui/layui.all.js"></script>
</head>

<body>
	<div class="page">
		<div class="loginwarrp">
			<div class="logo">管理员登陆</div>
			<div class="login_form">
				<form id="Login" name="Login" onsubmit="" action="LoginServlet" method="post">
					<li class="login-item "><span>用户名：</span> <input type="text"
						id="username" name="username" class="login_input "> <span
						id="count-msg" class="error "></span></li>
					<li class="login-item "><span>密 码：</span> <input
						type="password" id="pwd" name="pwd" class="login_input ">
						<span id="password-msg " class="error "></span></li>
					<!-- <li class="login-item verify "><span>验证码：</span> <input
						type="text " name="CheckCode " class="login_input verify_input ">
					</li> <img src="images/verify.png " border="0 " class="verifyimg " /> -->
					<div class="clearfix "></div>
					<li class="login-sub "><input type="submit" name="Submit "
						value="登录 " /> <input type="reset" name="Reset " value="重置 " />
						<input type="button" onclick="javascript:location.href='regist.html';" name="regist"
						value="快速注册 " />
					</li>
				</form>
			</div>
		</div>
	</div>
	<!-- <script type="text/javascript ">
		window.onload = function() {
			var config = {
				vx : 4,
				vy : 4,
				height : 2,
				width : 2,
				count : 100,
				color : "121, 162, 185 ",
				stroke : "100, 200, 180 ",
				dist : 6000,
				e_dist : 20000,
				max_conn : 10
			}
			CanvasParticle(config);
  	var usernameObj=document.getElementById("username ");
  	var pwdObj=document.getElementById("pwd ");
		document.getElementById("rem ").onclick=function(){
			if(this.checked==true){
				document.cookie="username="+usernameObj.value;
				document.cookie=" pwd="+pwdObj.value;
			}
		};
	  var cookie=document.cookie.split(" ; ");
	  	for(var i=0;i<cookie.length;i++){
	  		var temp=cookie[i].split("=");
	  		console.log(temp);
	  		if(temp[0]==" username "){
	  			usernameObj.value=temp[1];
	  		}
	  		if(temp[0]==" pwd "){
	  			pwdObj.value=temp[1];
	  		}
	  	}
  
  	
  	
		}
	</script>-->
	<!-- 表单的验证 -->
	<script>
		
		$(function(){
			
			$("#username").blur(function(){
				
				$.get("CheckServlet","username="+$(this).val()+"&random="+Math.random(),function(data,status){
					
					if(status=="success"){
						$("#count-msg").html(data);
					}
				});
				
			});
			
		});
		
		
		
	</script>
	
	<script type="text/javascript " src="js/canvas-particle.js "></script>
</body>
</html>